1. Field of the Invention
This invention generally relates to digital image processing and, more particularly, to a method for attenuating color-cast corrections in image highlight regions.
2. Description of the Related Art
Many digital images, for example digital photographs, can be dramatically improved if the image is color corrected before presentation. For example, a (red/green/blue) RGB color-imaging system can be “color balanced” or “white balanced” (i.e., calibrated/aligned/set up) such that, for some particular illumination spectrum (illuminant 1), a nonselective neutral object (i.e., one having a constant spectral reflectance response vs. wavelength) will produce equal R, G, B components in the image. If some other light spectrum (illuminant 2) shines on the scene and the same scene is photographed using the color balance setup for illuminant 1, then the RGB's in the image under illuminant 2 will not be equal. If they are far enough off, the image will not appear neutral, i.e., it will have a color cast. This is analogous to using a daylight film to photograph an indoor scene under tungsten illumination, where the picture comes out with a yellow cast. This problem can be fixed by putting just the right blue filter over the lens. Then, neutrals (objects with flat reflectance spectra) in the indoor scene will come out neutral in the indoor picture, just like the same objects would do in the outdoor picture taken without the filter. The color cast correction transform in the digital imaging system is similar to this blue filter in the analog imaging system. An illuminant estimation process attempts to determine a scene illuminant from an analysis of the image. Color cast correction creates one or more correction transforms, analogous to one or more filters of “just the right color”, based on this estimate. In digital imaging, the correction is applied after (not during) image capture, to adjust the RGB's of the image and to rebalance it so nonselective neutrals once again come out with equal R, G, B components.
A RGB digital image can be color-cast corrected, white-balanced, or gray-balanced via a single “global” transformation, using a von Kries type matrix transform for example. This transform, and many other similar correction methods, are dependent upon an illuminant estimation procedure that is applied to the image data. In this approach, all the colors in the image are adjusted in an identical manner based upon the assumption that of the image regions have been lit by a common illuminant.
For example, an image taken under incandescent light may have a strong yellow cast when the digital camera's manual color controls are incorrectly set, or when the camera's automatic white balance algorithm fails. Correcting such an image using a single transform, derived from the overall image statistics, shifts all the pixels (except pure black ones) in the direction of blue. In the midtone and shadow areas, the visual effect of the correction is good—the output pixels for neutral objects are more neutral (i.e., their RGB components are more nearly equal), as desired. But in specular highlights and/or overexposed areas that are pure white in the original image (R=G=B=1, where 1 is the maximum value), an image corrected in this manner has a pronounced color-cast whose hue is complementary to that of the estimated illuminant. In the above example, the color white in the original image becomes pastel blue in the corrected image. This appears unnatural on a reflection print made on a nominally white substrate where some of the regions of the substrate, such as the regions adjacent the white borders, remain unmarked by the printing process. The human eye is sensitive to these errors in the correction process. Intuitively, “whites should still look white” after the image is corrected.
Further, pure white pixels in the original image are usually the result of the color component information being clipped during image capture, and there is no way to recover the real hue associated with these pixels at the time the image was taken.
It would be advantageous if highlight regions in an image were not treated identically to other colors, when a digital image is being color-cast corrected.
It would be advantageous if white pixels in an image were treated differently than other colors, when a digital image is being color-cast corrected.
It would be advantageous if the color-cast corrections that are applied to a corrected image could be attenuated, or not applied at all, for the white pixels in the original image.